﻿<!--#include file="base64.asp"-->
<% 
g_Key="zdw1asdfsadfsad3r12asdfas324sdfasdfvft5dfaxdcvasdfqwer13245wefZXczxcsdfsdfsdfsd"

Function EnCrypt(strCryptThis) 
	Dim strChar, iKeyChar, iStringChar, I 
	For I = 1 to Len(strCryptThis) 
		iKeyChar = Asc(mid(g_Key,I,1)) 
		iStringChar = Asc(mid(strCryptThis,I,1)) 
		iCryptChar = iKeyChar Xor iStringChar 
		strEncrypted = strEncrypted & Chr(iCryptChar) 
	Next 
	'EnCrypt = strEncrypted 
	EnCrypt = Base64encode(strEncrypted)
End Function 

Function DeCrypt(strTodecode) 
	strEncrypted=Base64decode(strTodecode)
	Dim strChar, iKeyChar, iStringChar, I 
	For I = 1 to Len(strEncrypted) 
		iKeyChar = (Asc(mid(g_Key,I,1))) 
		iStringChar = Asc(mid(strEncrypted,I,1)) 
		iDeCryptChar = iKeyChar Xor iStringChar 
		strDecrypted = strDecrypted & Chr(iDeCryptChar) 
	Next 
	DeCrypt = strDecrypted 
End Function 

%> 
